function displayErrorMessage(messageText, id){ 
		
		if((id == null) || (id == '')){
			id= 'statusMessage';
		}
		
		var errorElem = document.getElementById(id);
		errorElem.className = 'status-message-error-main';
		errorElem.style.display = "block";
		var msgContent = document.getElementById(id + "Content" );
		var content = msgContent.innerHTML = messageText;
}
function displaySuccessMessage(messageText, id){ 
	
		if((id == null) || (id == '')){
			id= 'statusMessage';
		}
	
		var successElem = document.getElementById(id);
		successElem.className = 'status-message-success-main';
		successElem.style.display = "block";
		var msgContent = document.getElementById(id + "Content");
		var content = msgContent.innerHTML = messageText;
}
function hideStatusMessage(id){
	
	if((id == null) || (id == '')){
		id= 'statusMessage';
	}
	
    var msgElem = document.getElementById(id);
    msgElem.style.display = 'none';
}

function hideAllErrorAndSuccessMessagesBelowParentElement(parentElementToSearchBelow){

	var errorNodes;
	var successNodes;
	var infoNodes;

	if((parentElementToSearchBelow != null) && (parentElementToSearchBelow != '')){
		errorNodes = YAHOO.util.Selector.query(".status-message-error-main", parentElementToSearchBelow);
		successNodes = YAHOO.util.Selector.query(".status-message-success-main", parentElementToSearchBelow);
		infoNodes = YAHOO.util.Selector.query(".status-message-INFO-container", parentElementToSearchBelow);
	}
	else{
		errorNodes = YAHOO.util.Selector.query(".status-message-error-main");
		successNodes = YAHOO.util.Selector.query(".status-message-success-main");
		infoNodes = YAHOO.util.Selector.query(".status-message-INFO-container");
	}
	
	if((errorNodes != null) && (errorNodes.length > 0)){
		for(var i = 0;i < errorNodes.length; i = i + 1){
			errorNodes[i].style.display = 'none';
		}
	}						
	
	if((successNodes != null) && (successNodes.length > 0)){			
		for(var j = 0; j < successNodes.length; j = j + 1){
			successNodes[j].style.display = 'none';
		}
	}
	
	if((infoNodes != null) && (infoNodes.length > 0)){			
		for(var j = 0; j < infoNodes.length; j = j + 1){
			infoNodes[j].style.display = 'none';
		}
	}
}